%填充曲线数据中的平直道。一般默认曲线数据有部分缺失
function output = fill_curvedata(curveData)
curveData_size = size(curveData,1);
if(curveData_size>0)
    % curveData = curveData(:,[1,2,3]);
    DataCurve.size = curveData_size*2+1;
    
    DataCurve.start = [0; zeros(DataCurve.size-1,1)];
    DataCurve.end = [zeros(DataCurve.size,1)];% km
    DataCurve.radius = zeros(DataCurve.size,1);% m
    % 数据拼接(默认没有连续的坡道，改为连续数据)
    for i = 1:1:curveData_size
        DataCurve.end(2*i-1) = curveData(i,1);
        DataCurve.start(2*i) = curveData(i,1);
        DataCurve.end(2*i) = curveData(i,2);
        DataCurve.radius(2*i) = curveData(i,3);
        DataCurve.start(2*i+1) = curveData(i,2);
    end
else
    DataCurve.start = [];
    DataCurve.end = [];
    DataCurve.radius = [];
end
curveData = [DataCurve.start,DataCurve.end,DataCurve.radius];
curveData(end,:) = [];
output = curveData;
